﻿Public Class SendTextRequest
    Inherits RequestBase
    Implements IRequest

#Region "Member Fields"
    Private _messageText As System.String
    Private _voice As Lookups.VoiceEnum
    Private _messageLifeInSeconds As UInt32
#End Region

#Region "Properties"
    Public Property MessageText() As System.String
        Get
            Return _messageText
        End Get
        Set(ByVal value As System.String)
            _messageText = value
        End Set
    End Property

    Public Property Voice() As Lookups.VoiceEnum
        Get
            Return _voice
        End Get
        Set(ByVal value As Lookups.VoiceEnum)
            _voice = value
        End Set
    End Property

    Public Property MessageLifeInSeconds() As UInt32
        Get
            Return _messageLifeInSeconds
        End Get
        Set(ByVal value As UInt32)
            _messageLifeInSeconds = value
        End Set
    End Property

#End Region

#Region "Constructors"
    Public Sub New()

    End Sub

    Public Sub New(ByVal serialNumber As String, ByVal token As Int32, ByVal messageText As String, ByVal voice As String, ByVal messageLifeInSeconds As UInt32)
        MyBase.SerialNumber = serialNumber
        MyBase.Token = token
        Me.MessageText = messageText
        Me.Voice = voice
        Me.MessageLifeInSeconds = messageLifeInSeconds
    End Sub
#End Region

#Region "IMessage Implementation"
    Public Function GetQueryString() As String Implements IRequest.GetQueryString
        Dim query As New QueryBuilder(SerialNumber, Token)
        query.SetVoice(Me.Voice)
        query.SetMessageLifeInSeconds(Me.MessageLifeInSeconds)
        query.SetMessageText(Me.MessageText)
        Return query.ToString
    End Function
#End Region

End Class